from selenium import webdriver
from bs4 import BeautifulSoup
import requests
import re
import os





url="https://www.51miz.com/sound/"
wb_data = requests.get(url)
soup =BeautifulSoup(wb_data.text,'html.parser')
titles=soup.find_all('source')

str="http:"
re=[]
for title in titles:
    title=str+title.attrs['src']
    re.append(title)

file3 = open('ip.txt', 'w')
for i in iter(re):
    print(i)
    file3.write(i+"\n")
file3.close()

print('写入文件成功！')




